<template>
  <el-pagination
  background
    @size-change="handleSizeChange"
    @current-change="handlePageChanged"
    :current-page.sync="page"
    :page-sizes="pageSelect"
    :page-size="pageView"
    layout="total, sizes, prev, pager, next, jumper"
    :page-count="10"
    :total="totalElements">
  </el-pagination>
</template>
<script lang="ts">
import { Vue, Component, Prop, Emit } from "vue-property-decorator";

@Component
export default class Page extends Vue {
  @Prop()
  protected page!: number;
  @Prop()
  protected totalPages!: number;
  @Prop()
  protected totalElements!: number;
  @Prop()
  protected pageView!: number;
  @Prop()
  protected pageSelect!: any;
  protected handleSizeChange(val: number) {
    this.$emit('handleSizeChange', val);
  }
  protected handlePageChanged(val: number) {
    this.$emit('handlePageChanged', val);
  }
}
</script>